package cn.vcjf.weapp.api.goods.mapper;

import cn.vcjf.weapp.api.goods.entity.GoodsOrder;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhengzihang
 * @since 2018-09-25
 */
public interface GoodsOrderMapper extends BaseMapper<GoodsOrder> {

	int updateGoodsOrderByOrderNo(GoodsOrder goodsOrder);

	int updateExpireUserOrder(@Param("userId") Integer userId,
	                          @Param("genAutoFailedTime")Integer genAutoFailedTime,
	                          @Param("teamAutoFailedTime")Integer teamAutoFailedTime,
	                          @Param("cutAutoFailedTime")Integer cutAutoFailedTime,
	                          @Param("autoCompletDays")  Integer autoCompletDays);

	/**
	 * 查询未评价的已完成的订单
	 *
	 * @param days
	 * @return
	 */
	List<GoodsOrder> selectNotCommentOrderList(int days);

}
